<?php
/**
 * 异常类型常量定义
 */

namespace Apps\Common\Constant;

/**
 * Class ExceptionConstant
 * @package Apps\Common\Constant
 */
class ExceptionConstant extends BaseConstant
{
    // 设置不需要记录日志的错误码
    const LOG_SKIP_CONST = [
        self::USER_PRIVACY_FORBIDDEN,
        self::USER_VERIFY_FAILED,
        self::CHATROOM_TOKEN_FAIL,
        self::REDIRECT_URL,
        self::MUTEX_LOCK_OCCUR,
        self::USER_REPEAT_MESSAGE,
        self::ROUTER_ERROR,
        self::PAGE_ERROR,
        self::NO_ERROR_ALARM,
        self::PARAMS_EMPTY,
        self::PARAMS_ILLEGAL
    ];

    //---------------------------------系统相关错误码----------------------------
    //  参数非法
    const PARAMS_ILLEGAL = 301;

    // 参数存在空值
    const PARAMS_EMPTY = 302;

    // 接口签名校验失败
    const SIGN_ERROR = 303;

    // 路由错误
    const ROUTER_ERROR = 304;

    // 页数错误
    const PAGE_ERROR = 305;

    // 文件上传错误
    const UPLOAD_FAILED = 306;

    // 系统内部错误
    const INTERNAL_ERROR = 307;

    // 互斥锁产生
    const MUTEX_LOCK_OCCUR = 308;

    // 接口请求过量
    const REQ_OVER_LIMIT = 309;

    // 验证码验证错误
    const VERIFY_CAPTCHA_FAILED = 310;

    // API通用错误
    const API_COMMON_FAILED = 311;

    // 重定向URL
    const REDIRECT_URL = 312;

    // 错误无需告警类型
    const NO_ERROR_ALARM = 313;

    //---------------------------------用户相关错误码----------------------------
    //  用户不合法
    const USER_ILLEGAL = 401;

    //  用户ID为空
    const USER_USERID_EMPTY = 402;

    //手机号已经被注册过
    const USER_MOBILE_IS_REGISTER = 403;

    //重复发送短息
    const USER_REPEAT_MESSAGE = 404;

    //短信验证发送次数过多
    const USER_SEND_MESSAGE_MORE = 405;

    //短信发送失败
    const USER_SEND_MESSAGE_FAILE = 406;

    //短信验证码错误
    const USER_MESSAGE_CODE_FAILE = 407;

    //短信验证码失效
    const USER_MESSAGE_CODE_LOSE = 408;

    //注册失败
    const USER_REGISTER_FAILED = 409;

    //用户登录状态验证失败
    const USER_VERIFY_FAILED = 410;

    //用户密码错误
    const USER_PASSWORD_ERROR = 411;

    //用户权限拒绝
    const USER_PRIVACY_FORBIDDEN = 412;

    // 用户黑名单错误
    const BLACKLIST_ERROR = 413;

    // 用户手机号未注册
    const USER_MOBILE_IS_UNREGISTER = 414;

    // 用户手机号绑定失败
    const USER_BIND_MOBILE_FAILED = 415;

    // 第三方登录失败
    const USER_THIRD_LOGIN_FAILED = 416;

    // 用户权限不合法
    const USER_PRIVILEGE_ILLEGAL = 417;

    // 聊天室token获取失败
    const CHATROOM_TOKEN_FAIL = 418;

    // 用户未绑定手机号
    const USER_UNBIND_MOBILE = 419;

    //---------------------------------WAP && PC 页面错误码----------------------
    const WAP_PAGE_ERROR = 1000;


}
